AC8 Mod Loader 0.2.0 (multi-folder) + Mod Launcher
===================================================

What this is
------------
A replacement for the single-mod main.dll. It works the same way (same hook,
same game version: AC8 1.1.2.0 / UE 5.4) but mounts every mod folder instead
of one, in an order you choose.


Install
-------
1. Open the folder of the loader you use now. It is inside UE4SS's "Mods"
   folder and contains "dlls" (with main.dll in it) and your mod folder(s).
2. Make a copy of dlls\main.dll somewhere safe.
3. Copy these into that folder:
       dlls\main.dll        (replace the old one)
       ModLauncher.bat
       ModLauncher.ps1
   Nothing else moves. Mod folders already there stay put and still load.

Only keep ONE copy of the loader. If the old main.dll is also installed in
another mod folder, remove or disable that one.


Adding mods
-----------
Give each mod its own folder next to "dlls", with the mod's .utoc and .ucas
files directly inside it:

    <loader folder>\
        dlls\main.dll
        ModLauncher.bat
        ModLauncher.ps1
        MyFirstMod\MyFirstMod_P.utoc      (+ .ucas)
        SomeOtherMod\SomeOtherMod_P.utoc  (+ .ucas)
        ...

Any folder with at least one .utoc file in it counts as a mod. A new folder
loads automatically, even before you open the launcher.


The launcher
------------
Double-click ModLauncher.bat.

  - Tick or untick a mod to switch it on or off.
  - Select a mod and use Move up / Move down to change the order. Mods load
    from top to bottom; a mod lower in the list loads later, so it should
    win if two mods change the same file.
  - Save writes loadorder.txt. Changes apply the next time the game starts.
  - Save and launch game also starts the game. The first time, it looks for
    the game's exe above this folder and asks you if it cannot find it.
    "Change..." picks a different exe. (To launch through Steam instead, put
    a steam://rungameid/NUMBER link in launcher.cfg.)
  - View last log opens AC8IoStoreLoader.log.

You can also edit loadorder.txt by hand: one folder per line, "+Name" is on,
"-Name" is off.


Checking it worked
------------------
Start the game, then open AC8IoStoreLoader.log (or "View last log").
A good run ends with a line like:

    done: 3 of 3 containers mounted from 3 mod folder(s)

If something is wrong:

  "mount signature matches=0" (or more than 1)
      The game was updated or is a different version. The loader changes
      nothing in that case. The byte patterns in the source need updating.

  "result code=<not 0>" under a mod
      The game refused that container; the message on the same line says why.
      The other mods still load.

  The log stops at "hook installed, waiting for pakchunk0-Windows.utoc"
      The game had already loaded its base files before the loader started.

  The launcher does not open
      A Notepad window with the error text should appear. That text says
      what went wrong.

To go back to the old loader, put your saved main.dll back in "dlls".


Limits
------
  - Only .utoc/.ucas containers are mounted. A .pak file in a mod folder is
    ignored, the same as with the original DLL.
  - Mods are mounted the same way the original DLL mounted its one mod. Mods
    that replace existing game files work this way. Mods that add brand-new
    assets may need more than this loader does.
  - Use modded files offline / in single player.


Source
------
The "source" folder has everything needed to rebuild main.dll (source\src,
run build.sh with LLVM installed) and the self-test used to check it
(source\test).
